//
//  QuiteLoginTableViewCell.m
//  FVQuickMessage
//
//  Created by dllo on 16/8/15.
//  Copyright © 2016年 zty. All rights reserved.
//

#import "QuiteLoginTableViewCell.h"

@interface QuiteLoginTableViewCell ()

@property (nonatomic, retain) UIButton *button;

@end

@implementation QuiteLoginTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    
    if (self) {
        self.button = [UIButton buttonWithType:UIButtonTypeSystem];
        [self.contentView addSubview:_button];
        [self config];
    }
    return self;
}

-(void)config {
    
    self.button.frame = CGRectMake(0, 0, self.contentView.bounds.size.width - 80, self.contentView.bounds.size.height);
    self.button.center = self.contentView.center;
    self.button.backgroundColor = [UIColor redColor];
    
}

-(void)setName:(NSString *)name {
    
    _name = name;
    
    [self.button setTitle:name forState:UIControlStateNormal];
    
}

@end
